package com.example.benyq.mediaplayerdemo;

import java.io.FileDescriptor;

/**
 * @author benyq
 * @date 17-12-11 19:11
 * @E-mail： 1520063035@qq.com
 * @description
 */
public interface IPlayback {

    boolean play();

    boolean play(String song);

    boolean pause();

    boolean isPlaying();

    int getProgress();

    int getDuration();

    void playNext();

    void playLast();

    boolean seekTo(int progress);

    void registerCallback(Callback callback);

    void unregisterCallback(Callback callback);

    void removeCallbacks();

    void releasePlayer();

    interface Callback {

        void onComplete(PlayState state);

        void onPlayStatusChanged(PlayState state);

        void onPosition(int position);
    }

}
